Notification Popup
Overview​
The XREAL notification popup system provides a simple framework for displaying various notifications and warnings to users through the NotificationListener
prefab.
Note: The NotificationListener prefab is already included in the
XREAL Interaction Setup
andXREAL Hands Interaction Setup
. For custom scenes, you can find this prefab in the Package and drag it into your scene.
Notification Types​
The XREALNotificationType
enum defines the following notification types:
- Battery Notifications: Displays warnings when device battery is low
- Temperature Notifications: Alerts when device temperature is high
- SLAM State Notifications: Provides information about SLAM tracking status
- Native Error Notifications: Shows errors from the XREAL system
Enabling/Disabling Notifications​
Each notification type can be independently enabled or disabled through the Inspector or via code:
// Get a reference to the listener
XREALNotificationListener listener = GetComponent<XREALNotificationListener>();
// Enable or disable specific notification types
listener.EnableLowPowerTips = true; // Control battery notifications
listener.EnableHighTempTips = false; // Control temperature notifications
listener.EnableSlamStateTips = true; // Control SLAM state notifications
listener.EnableNativeErrorTips = true; // Control native error notifications
Customizing Notification Text​
To modify notification text, you can use the provided LocalizationTool
for customization. This allows you to adjust notification content for different languages or specific requirements.
Use Cases​
- Battery Management: Alert users when device battery is low
- Temperature Monitoring: Notify users when the device is overheating
- Tracking Quality Indicators: Help users understand current SLAM tracking status
- System Issue Alerts: Inform users about system-level problems that may affect application performance